USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_DROP_TABLAS]    Script Date: 11/28/2011 12:06:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0003_DROP_TABLAS]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0003_DROP_TABLAS]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_DROP_TABLAS]    Script Date: 11/28/2011 12:06:46 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[WASP_M0003_DROP_TABLAS] AS
BEGIN

if exists (select * from dbo.sysobjects
					where id = object_id(N'[as_prima_comision_temp]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [as_prima_comision_temp]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_valores_seguros]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_valores_seguros]
end


if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_codigos_seguros]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_codigos_seguros]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_seguros]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_seguros]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_seguro_degrav]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_seguro_degrav]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_seguro_asisten_pen]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_seguro_asisten_pen]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_total_cuotas]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_total_cuotas]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[PrimLiq]') 
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin	
drop table [PrimLiq]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_notaria]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_notaria]
end

if exists (select * from dbo.sysobjects 
					where id = object_id(N'[prima_comision_impuesto]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_impuesto]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_comision_seguro_vida_tra]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [prima_comision_seguro_vida_tra]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[prima_temp]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table[dbo].[prima_temp]
end

if exists (select * from dbo.sysobjects 
					where id = object_id(N'[TIPO_CREDITO_TEMP]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table[dbo].[TIPO_CREDITO_TEMP]
end


if exists (select * from dbo.sysobjects
					where id = object_id(N'[seguro_ces_pri]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [seguro_ces_pri]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'dbo.montos_refundidos')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table dbo.montos_refundidos
end

end
 



GO

